home *** CD-ROM | disk | FTP | other *** search
Wrap
XSetup plugin | 2001-05-11 | 5.2 KB | 175 lines
"FILE"="Xteq Systems X-Setup Plugin 6.0" "TYPE"="9" "COUNT"="1" "UIPATH"="Appearance\Start menu\Visible Items" "NAME"="Visible Items" "VERSION"="1.21" "LANGUAGE"="VBScript" "TEXT 1"="Aha! You can't see this!" "DESCRIPTION 1"="Use this plug-in to show or hide some of the items in the Start menu." "DESCRIPTION 2"="NOTE #1: You can only hide "Documents" if you have IE4 (with Windows Desktop Update) installed, and "Help" can only be hidden in Windows 2000 and Me." "DESCRIPTION 3"="NOTE #2: It can happen that if you disable the "Run..." command, you can no longer use the address bar of Internet Explorer. This seems to be a bug inside IE." "DESCRIPTION 4"="NOTE #3: Disabling "Find..." may also disable the context menu (Right-click) of the START button." "DESCRIPTION 5"="NOTE #4: Show "Log Off <Username>" might not work if you are using Windows 98 or Windows Me with IE 5 installed. Also, disabling this option will disable the SHUTDOWN button in the CTRL+ALT+DEL menu in Windows 9x" "DESCRIPTION 6"="NOTE #5: In Windows 2000 and Me, hiding the Run option will not disable the Windows+R key combination, so users will still be able to access the Run command." "AUTHOR"="Neil R. Turner (totalxs@hotmail.com) for Xteq Systems" "CONTACTURL"="http://www.128moorlane.freeserve.co.uk/" "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved" "COMMENT 1"="Thanks to Joe [gojoecollier@naxs.net] for the "Run might kill IE" bug notice!" "COMMENT 2"="Thanks to Jon-Roar Selenius [jseleniu@online.no] for spotting the "Recent Documents always empty" bug." "COMMENT 3"="Thanks to CptSiskoX for the "Show Log Off" Win98 note." "COMMENT 4"="Thanks to Bill Hudacek [hudacek@us.ibm.com] for spotting the NoFind = NoRightMouse bug." "COMMENT 5"="Thanks to SIMONORORKE for the Windows 2000 Logoff option!" sP="HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\" sP1="HKLM\Software\Microsoft\Internet Explorer\Version" ' This is for checking the IE version sP2="HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoSMHelp" sP3="HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\StartMenuRun" 'DW sP4="HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\StartMenuLogoff" 'DW SUB Plugin_Initialize ' Step 1: Add UI Elements... j=RegReadValue(sP1) if j>"4" then ' Only show if IE4 or better is installed Call SetUIElement(1,"Favorites") end if j=RegReadValue(sP1) if j>"4" then Call SetUIElement(2,"Documents") end if j=RegReadValue(sP1) if j>"4" then Call SetUIElement(6,"Log Off <username>...") end if k=GetWinVer if k>3 then Call SetUIElement(7,"Help") end if ' These are universal so no checking is necessary Call SetUIElement(3,"Run...") Call SetUIElement(4,"Shut Down...") if k=5 then Call SetUIElement(5,"Search") else Call SetUIElement(5,"Find") end if ' Step 2: Find out if they are enabled or not... i=RegReadValue(sp&"NoFavoritesMenu") 'DW If IsEmpty(i)=true or i=0 then Call SetUIElementEx(1,true) end if i=RegReadValue(sp&"NoRecentDocsMenu") 'DW if IsEmpty(i)=true or i=0 then Call SetUIElementEx(2,true) end if if k<4 then i=RegReadValue(sp&"NoRun") 'DW if IsEmpty(i)=true or i=0 then Call SetUIElementEx(3,true) end if else i=RegReadValue(sP3) 'DW if IsEmpty(i)=false or i=1 then Call SetUIElementEx(3,true) end if end if i=RegReadValue(sp&"NoClose") 'DW if IsEmpty(i)=true or i=0 then Call SetUIElementEx(4,true) end if i=RegReadValue(sp&"NoFind") if IsEmpty(i)=true or i=0 then Call SetUIElementEx(5,true) end if if k>3 then i=RegReadValue(sP4) 'DW if IsEmpty(i)=false or i=1 then Call SetUIElementEx(6,true) end if else i=RegReadValue(sp&"NoLogOff") 'Binary if IsEmpty(i)=true or i="00000000" then Call SetUIElementEx(6,true) end if end if i=RegReadValue(sP2) 'DW if IsEmpty(i)=true or i=0 then Call SetUIElementEx(7,true) end if END SUB 'Called when the Plugin should apply the changes SUB Plugin_Apply(ElementIndex,ElementSubIndex) w=GetWinVer Call WriteIt(1,sp&"NoFavoritesMenu") Call WriteIt(2,sp&"NoRecentDocsMenu") if w<4 then Call WriteIt(3,sP&"NoRun") else b=GetUIElementEx(3) if b=false then s=RegReadValue(sP3) if IsEmpty(s)=false then Call RegDeleteValue(sP3) end if else Call RegWriteValue(sP3,1,2) end if end if Call WriteIt(4,sp&"NoClose") Call WriteIt(5,sp&"NoFind") Call WriteIt(7,sp2) if w>3 then b=GetUIElementEx(6) if b=false then s=RegReadValue(sP4) if IsEmpty(s)=false then Call RegDeleteValue(sp4) end if else Call RegWriteValue(sP4,1,2) end if else b=GetUIElementEx(6) if b=true then s=RegReadValue(sp&"NoLogOff") if IsEmpty(s)=false then Call RegDeleteValue(sp&"NoLogOff") end if else Call RegWriteValue(sp&"NoLogOff","01000000",3) end if end if Call IndicateSettingChange() END SUB Sub WriteIt(ITM,PATH1) b=GetUIElementEx(ITM) if b=true then s=RegReadValue(PATH1) if IsEmpty(s)=false then Call RegDeleteValue(PATH1) end if else Call RegWriteValue(PATH1,1,2) end if End Sub SUB Plugin_Terminate END SUB